package com.zzzfwd.menuhelper

import android.content.SharedPreferences
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider

class MenuViewModelFactory(private val sharedPreferences: SharedPreferences) :
    ViewModelProvider.Factory {

    override fun <T : ViewModel> create(modelClass: Class<T>): T {
        @Suppress("UNCHECKED_CAST")
        return MenuViewModel(MenuRepository(sharedPreferences)) as T
    }
}